/*******************************************************************************
	PhidgetKActorSphere

	Creation date: 02/07/2010 14:17
	Copyright (c) 2010, steve-Mac
	<!-- $Id: NewClass.uc,v 1.1 2004/03/29 10:39:26 elmuerte Exp $ -->
*******************************************************************************/

class PhidgetKActorSphere extends KActorSpawnable placeable; //DLLBind(Phidget21);

//var int nativeRef;

//dllimport final function int CPhidget_open(out int phidgetHandle, int phidgetSerial);
//dllimport final function CPhidgetAccelerometer_getAcceleration( int phidgetAccel, out float curaccel);
//dllimport final function CallDLL1(out string s);


simulated function PreBeginPlay()
{

	//local string s;
	//local int testphidgetID ;
	//s = string(phidgetSerial);

	`log("***********************************************");
	`log("***** STEVE - PreBeginplay in PhidgetPawn *****");
	`log("***********************************************");

	//super.PreBeginPlay();

	SetTimer(5.0, true);
	
	//phidgetID=i;
	//
	//CPhidget_open(phidgetSerial);
	//testphidgetID = 93420;
	//CPhidget_open(testphidgetID);

}




simulated function PostBeginPlay() {

	`log("***********************************************");
	`log("***** STEVE - PostBeginPlay in PhidgetPawn ****");
	`log("***********************************************");
	StaticMeshComponent.WakeRigidBody();
	
	StaticMeshComponent.AddForce(Vect(500,0,0));
}



function Timer() {
	//local float curAccel;//, totalAccel; 
	//local Vector vectForce;

	`log("***********************************************");
	`log("***** STEVE - TIMER in PhidgetPawn ************");
	`log("***********************************************");

	//Velocity = (-1) * Velocity;
	//local float totalAccel;
		
//	CPhidgetAccelerometer_getAcceleration(phidgetSerial, curAccel);
	
	//vectForce.x = curAccel;
	//vectForce.y = 0;
	//vectForce.z = 0;
	
	//StaticMeshComponent.AddForce(vectForce);

}


defaultproperties
{

	//phidgetID = 93420
	//phidgetID = 0

	Begin Object Class=StaticMeshComponent Name=StaticMeshComponent01
		StaticMesh=StaticMesh'SH_Package.TestObjects.SH_Mesh'
		bNotifyRigidBodyCollision=true
		HiddenGame=TRUE
		ScriptRigidBodyCollisionThreshold=0.001
		LightingChannels=(Dynamic=TRUE)
		DepthPriorityGroup=SDPG_Foreground
	End Object
	Components.Add(StaticMeshComponent01)

	// This collision object is used to get a touch event
	// from the bricks when the bricks are at 0 health
	Begin Object Class=StaticMeshComponent Name=StaticMeshComponent02
		StaticMesh=StaticMesh'SH_Package.TestObjects.SH_Mesh'
		HiddenGame=TRUE
		CollideActors=TRUE
		BlockActors=FALSE
		AlwaysCheckCollision=TRUE
		RBCollideWithChannels=(Default=TRUE,BlockingVolume=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,FracturedMeshPart=FALSE)
	End Object
	Components.Add(StaticMeshComponent02)


}
